//Thread Local Allocation Buffer - 线程本地分配
//	-XX:-DoEscapeAnalysis -XX:-EliminateAllocations -XX:-UseTLAB
//	-代表去掉属性	去掉逃逸分析	去掉标用替换					去掉TLAB
public class TLAB {

	class USER{
		int id;
		String name;
		public USER(int id, String name) {
			this.id = id;
			this.name = name;
		}
	}

	void alloc(int i) {
		new USER(i,"name "+i);
	}

	public static void main(String[] args) {

		TLAB t = new TLAB();
		long start = System.currentTimeMillis();	//返回当前时间（以毫秒为单位）
		for(int i=0;i<1000_0000;i++) {				//仅仅是为了增强可读性
			t.alloc(i);
		}
		long end = System.currentTimeMillis();
		System.out.println(end - start);
	}

}
